Skip to content

Instantly share code, notes, and snippets.

@bitingsock
bitingsock / ytdl-preload.lua
Last active May 17, 2024 12:31
Precache the next entry in your playlist if it is a network source by downloading it to a temp file ahead of time. Change Line 20 to temp directory. It will delete the directory on exit.
----------------------
-- #example ytdl_preload.conf
-- # make sure lines do not have trailing whitespace
-- # ytdl_opt has no sanity check and should be formatted exactly how it would appear in yt-dlp CLI, they are split into a key/value pair on whitespace
-- # at least on Windows, do not escape '\' in temp, just us a single one for each divider
-- #temp=R:\ytdltest
-- #ytdl_opt1=-r 50k
-- #ytdl_opt2=-N 5
-- #ytdl_opt#=etc
{
"header": {
"version": "2.1.0",
"mc_version": "1.17.1",
"name": "Copy 8",
"author": "Howester84",
"bounding_box": {
"min_x": 0,
"min_y": 0,
"min_z": 0,
@JLChnToZ
JLChnToZ / syncgif.js
Created January 14, 2018 14:16
A little script for refreshing all gifs on a webpage to make them synchronized.
(function refreshGif(selector, images, srcs) {
var mode = !!srcs, i;
if(mode) {
for(i = 0; i < images.length; i++)
images[i].src = srcs[i];
return;
}
var dummyGif = 'data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==';
images = document.querySelectorAll((selector || '') + ' img[src$=\'.gif\']');
srcs = [];
@diasporx
diasporx / JetBrains products Activation code until 14 October 2024
Last active May 17, 2024 12:29
JetBrains products Activation code until 14 October 2024
I2A0QUY8VU-eyJsaWNlbnNlSWQiOiJJMkEwUVVZOFZVIiwibGljZW5zZWVOYW1lIjoiVU5JVkVSU0lEQURFIEVTVEFEVUFMIERFIENBTVBJTkFTIiwiYXNzaWduZWVOYW1lIjoiVGFvYmFv77yaSkVU5YWo5a625qG25r+AIOa0u+W3peS9nOWupCAgcmVuIHpodW4gZGlhbiBtaW5n77yBIiwiYXNzaWduZWVFbWFpbCI6IlJvYmJ5X1dlbmlnZXJAb3V0bG9vay5jb20iLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IkRQTiIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiREIiLCJwYWlkVXBUbyI6IjIwMjQtMTAtMTQiLCJleHRlbmRlZCI6ZmFsc2V9LHsiY29kZSI6IlBTIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJJSSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNDIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOmZhbHNlfSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAyNC0xMC0xNCIsImV4dGVuZGVkIjpmYWxzZX0seyJjb2RlIjoiUlNGIiwicGFpZFVwVG8iOiIyMDI0LTEwLTE0IiwiZXh0ZW5kZWQiOnRydWV9LHsiY29kZSI6IkRTIiwicGFpZFVwVG8iOiIyMDI0LTEwL
.css-selector {
    background: linear-gradient(270deg, #ee7b1e, #eea01e, #e35311);
    background-size: 600% 600%;
    -webkit-animation: AnimationName 30s ease infinite;
    -moz-animation: AnimationName 30s ease infinite;
    -o-animation: AnimationName 30s ease infinite;
    animation: AnimationName 30s ease infinite;
}
@-webkit-keyframes AnimationName {
    0%{background-position:0% 50%}
@JLChnToZ
JLChnToZ / cyrillic.user.js
Last active May 17, 2024 12:27
A user script that will transliterates all Latin characters to Cyrillic. Just for fun.
// ==UserScript==
// @name Cyrillic?
// @namespace JLChnToZ
// @grant none
// @version 1.0
// @author -
// @description Transliterates all Latin characters to Cyrillic.
// ==/UserScript==
(() => {
const transliterate = ((latin, cyrillic) => {
@parthamk
parthamk / InterviewPrep.md
Last active May 17, 2024 12:27
Javascript Interview prep

Theoretical Questions and Answers

Variables and Data Types

  1. Question: What are the different data types in JavaScript?

    Answer: JavaScript has several data types, including:

    • Primitive types: String, Number, Boolean, Null, Undefined, Symbol, and BigInt.
    • Non-primitive types: Object (which includes arrays and functions).
@JLChnToZ
JLChnToZ / vrchatlog.ps1
Last active May 17, 2024 12:26
Live view VRChat runtime log on console legally (mod-free)
$Host.UI.RawUI.WindowTitle = 'VRChat Log'
$Host.UI.RawUI.BackgroundColor = 'Black'
$Host.PrivateData.VerboseForegroundColor = 'White'
Clear-Host
Get-Content -Tail $Host.UI.RawUI.BufferSize.Height -Wait -Encoding UTF8 (Get-ChildItem -Path "$($Env:LocalAppData)Low\VRChat\VRChat" -Filter 'output_log_*.txt' | Sort-Object LastWriteTime -Descending | Select-Object -First 1 | ForEach-Object {$_.FullName}) | Where-Object {$_.Trim() -ne ''} | ForEach-Object {
if ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sError') {
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.ErrorForegroundColor
$Host.UI.RawUI.BackgroundColor = $Host.PrivateData.ErrorBackgroundColor
} elseif ($_ -match '^\d{4}\.\d{2}\.\d{2}\s\d{2}:\d{2}:\d{2}\sException') {
$Host.UI.RawUI.ForegroundColor = $Host.PrivateData.ErrorForegroundColor
@JLChnToZ
JLChnToZ / ObjectSnapshot.cs
Last active May 17, 2024 12:26
Take snapshots of properties of objects/components on play mode and re-apply them when stopped.
using System;
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEditor;
using UnityEditor.SceneManagement;
using UnityObject = UnityEngine.Object;